<template>
  <div>
    <div v-if="!edit">
      {{ field.value }}
    </div>  <el-input-number
      v-if="edit"
      :key="field.name"
      v-model="field.value"
      :title="field.title"
      type="number"
      :required="field.required && true || false"
      :readonly="field.readonly"
    />
  </div>
</template>

<script>
export default {
  name: 'FieldFloat',
  props: {
    'field': { type: Object, default () { return {} } },
    edit: { type: Boolean, defautl: false }
  }, inject: ['value'], computed: {
    pvalue: function () {
      return this.value
    }
  }
}
</script>

<style scoped>

</style>
